#include <QCoreApplication>
#include <iostream>
#include <math.h>
using namespace std;
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    int N,i,n;
    cout<<"Vvedite chislo: ";
    cin>>N;n=N;
          for(;n>0;i++)
          {
             n/=10;
          }
    int sum[i];
    int k=i;
   while (i-1>0)
   {
      sum[i-1]=N/int(exp(i*log(10)))%int(exp(i*log(10)));
       i--;
   }
   for(int j=0;j<=k;j++)
       cout<<sum[j];
    return a.exec();
}
